//package com.navinfo.opentsp.platform.computing.analysis.application;
//
//import com.navinfo.opentsp.platform.computing.analysis.entity.drivingAnalysis.LocationDataPoint;
//import com.navinfo.opentsp.platform.computing.analysis.service.IdleSpeedService;
//import com.navinfo.opentsp.platform.computing.analysis.service.impl.LocationDataService;
//import org.apache.spark.api.java.JavaRDD;
//import org.apache.spark.api.java.JavaSparkContext;
//import org.apache.spark.sql.SparkSession;
//
//import java.io.IOException;
//import java.util.Map;
//public class IdleSpeedAnalysis {
//
//    IdleSpeedService idleSpeedService = new IdleSpeedService();
//    LocationDataService locationDataService = new LocationDataService();
//    private void start(String[] args) throws IOException {
//        SparkSession spark = idleSpeedService.getSpark();
//        JavaSparkContext sparkContext = idleSpeedService.createSparkContext(spark);
//        Map<String, String> config = idleSpeedService.getConfig();
//        JavaRDD<LocationDataPoint> locationRDD = locationDataService.loadData(spark,Integer.parseInt(args[0]), config);
//        locationDataService.calcIdleSpeed(sparkContext, locationRDD, args, config);
//        spark.stop();
//    }
//
//    public static void main(String[] args) throws IOException {
//        new IdleSpeedAnalysis().start(args);
//    }
//}
